package com.cham.pdm.service;

import com.cham.enums.ChamSysCodeEnum;
import com.cham.register.ChamRegistryDTO;
import com.cham.user.dto.UserInfo;
import com.cham.user.entity.User;
import com.cham.video.dto.VideoInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * @author Howl-Xu
 * @version 1.0.0
 * @Description: 请描述一下这个类文件吧
 * @createTime 2020年03月14日 11:31:00
 */
@FeignClient("cham-user-service")
public interface UserService {
    @GetMapping("/user/isUserExist")
    boolean isUserExist(@RequestParam("account") String account, @RequestParam("password") String password);

    @GetMapping("/user/getUserByAccountAndPassword")
    User getUserByAccountAndPassword(@RequestParam("account") String account, @RequestParam("password") String password);

    //根据用户的uuid查找用户头像
    @GetMapping("/user/getUserHeadImgByUUID")
    String getUserHeadImgByUUID(@RequestParam("uuid") String uuid);

    @GetMapping("/user/getUserInfoByUserUUID")
    UserInfo getUserInfoByUserUUID(@RequestParam("uuid") String uuid);

    @PostMapping("/user/register")
    ChamSysCodeEnum register(@RequestBody User user);

    @PostMapping("/user/updateUserInfo")
    ChamSysCodeEnum updateUserInfo(@RequestBody UserInfo userInfo);

    @PostMapping("/user/updateHeadImg")
    ChamSysCodeEnum updateHeadImg(@RequestBody UserInfo userInfo);
}
